3.17 \(\int \frac{(d+i c d x)^2 (a+b \tan ^{-1}(c x))}{x^4} \, dx\)

Optimal. Leaf size=87 \[ -\frac{d^2 (1+i c x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{i b c^2 d^2}{x}-\frac{4}{3} b c^3 d^2 \log (x)+\frac{4}{3} b c^3 d^2 \log (c x+i)-\frac{b c d^2}{6 x^2} \]

[Out]

-(b*c*d^2)/(6*x^2) - (I*b*c^2*d^2)/x - (d^2*(1 + I*c*x)^3*(a + b*ArcTan[c*x]))/(3*x^3) - (4*b*c^3*d^2*Log[x])/
3 + (4*b*c^3*d^2*Log[I + c*x])/3

________________________________________________________________________________________

Rubi [A]  time = 0.0818295, antiderivative size = 87, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.174, Rules used = {37, 4872, 12, 88} \[ -\frac{d^2 (1+i c x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{i b c^2 d^2}{x}-\frac{4}{3} b c^3 d^2 \log (x)+\frac{4}{3} b c^3 d^2 \log (c x+i)-\frac{b c d^2}{6 x^2} \]

Antiderivative was successfully verified.

[In]

Int[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x^4,x]

[Out]

-(b*c*d^2)/(6*x^2) - (I*b*c^2*d^2)/x - (d^2*(1 + I*c*x)^3*(a + b*ArcTan[c*x]))/(3*x^3) - (4*b*c^3*d^2*Log[x])/
3 + (4*b*c^3*d^2*Log[I + c*x])/3

Rule 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 4872

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((f_.)*(x_))^(m_.)*((d_.) + (e_.)*(x_))^(q_.), x_Symbol] :> With[{u = I
ntHide[(f*x)^m*(d + e*x)^q, x]}, Dist[a + b*ArcTan[c*x], u, x] - Dist[b*c, Int[SimplifyIntegrand[u/(1 + c^2*x^
2), x], x], x]] /; FreeQ[{a, b, c, d, e, f, q}, x] && NeQ[q, -1] && IntegerQ[2*m] && ((IGtQ[m, 0] && IGtQ[q, 0
]) || (ILtQ[m + q + 1, 0] && LtQ[m*q, 0]))

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rubi steps

\begin{align*} \int \frac{(d+i c d x)^2 \left (a+b \tan ^{-1}(c x)\right )}{x^4} \, dx &=-\frac{d^2 (1+i c x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-(b c) \int \frac{i d^2 (i-c x)^2}{3 x^3 (i+c x)} \, dx\\ &=-\frac{d^2 (1+i c x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{1}{3} \left (i b c d^2\right ) \int \frac{(i-c x)^2}{x^3 (i+c x)} \, dx\\ &=-\frac{d^2 (1+i c x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{1}{3} \left (i b c d^2\right ) \int \left (\frac{i}{x^3}-\frac{3 c}{x^2}-\frac{4 i c^2}{x}+\frac{4 i c^3}{i+c x}\right ) \, dx\\ &=-\frac{b c d^2}{6 x^2}-\frac{i b c^2 d^2}{x}-\frac{d^2 (1+i c x)^3 \left (a+b \tan ^{-1}(c x)\right )}{3 x^3}-\frac{4}{3} b c^3 d^2 \log (x)+\frac{4}{3} b c^3 d^2 \log (i+c x)\\ \end{align*}

Mathematica [C]  time = 0.0903624, size = 114, normalized size = 1.31 \[ -\frac{d^2 \left (6 i b c^2 x^2 \text{Hypergeometric2F1}\left (-\frac{1}{2},1,\frac{1}{2},-c^2 x^2\right )-6 a c^2 x^2+6 i a c x+2 a+8 b c^3 x^3 \log (x)-4 b c^3 x^3 \log \left (c^2 x^2+1\right )+2 b \left (-3 c^2 x^2+3 i c x+1\right ) \tan ^{-1}(c x)+b c x\right )}{6 x^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((d + I*c*d*x)^2*(a + b*ArcTan[c*x]))/x^4,x]

[Out]

-(d^2*(2*a + (6*I)*a*c*x + b*c*x - 6*a*c^2*x^2 + 2*b*(1 + (3*I)*c*x - 3*c^2*x^2)*ArcTan[c*x] + (6*I)*b*c^2*x^2
*Hypergeometric2F1[-1/2, 1, 1/2, -(c^2*x^2)] + 8*b*c^3*x^3*Log[x] - 4*b*c^3*x^3*Log[1 + c^2*x^2]))/(6*x^3)

________________________________________________________________________________________

Maple [A]  time = 0.036, size = 145, normalized size = 1.7 \begin{align*}{\frac{-ic{d}^{2}a}{{x}^{2}}}+{\frac{{c}^{2}{d}^{2}a}{x}}-{\frac{{d}^{2}a}{3\,{x}^{3}}}-{\frac{ic{d}^{2}b\arctan \left ( cx \right ) }{{x}^{2}}}+{\frac{b{c}^{2}{d}^{2}\arctan \left ( cx \right ) }{x}}-{\frac{b{d}^{2}\arctan \left ( cx \right ) }{3\,{x}^{3}}}+{\frac{2\,{c}^{3}{d}^{2}b\ln \left ({c}^{2}{x}^{2}+1 \right ) }{3}}-i{c}^{3}{d}^{2}b\arctan \left ( cx \right ) -{\frac{ib{c}^{2}{d}^{2}}{x}}-{\frac{bc{d}^{2}}{6\,{x}^{2}}}-{\frac{4\,{c}^{3}{d}^{2}b\ln \left ( cx \right ) }{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^4,x)

[Out]

-I*c*d^2*a/x^2+c^2*d^2*a/x-1/3*d^2*a/x^3-I*c*d^2*b*arctan(c*x)/x^2+c^2*d^2*b*arctan(c*x)/x-1/3*d^2*b*arctan(c*
x)/x^3+2/3*c^3*d^2*b*ln(c^2*x^2+1)-I*c^3*d^2*b*arctan(c*x)-I*b*c^2*d^2/x-1/6*b*c*d^2/x^2-4/3*c^3*d^2*b*ln(c*x)

________________________________________________________________________________________

Maxima [A]  time = 1.47882, size = 194, normalized size = 2.23 \begin{align*} \frac{1}{2} \,{\left (c{\left (\log \left (c^{2} x^{2} + 1\right ) - \log \left (x^{2}\right )\right )} + \frac{2 \, \arctan \left (c x\right )}{x}\right )} b c^{2} d^{2} - i \,{\left ({\left (c \arctan \left (c x\right ) + \frac{1}{x}\right )} c + \frac{\arctan \left (c x\right )}{x^{2}}\right )} b c d^{2} + \frac{1}{6} \,{\left ({\left (c^{2} \log \left (c^{2} x^{2} + 1\right ) - c^{2} \log \left (x^{2}\right ) - \frac{1}{x^{2}}\right )} c - \frac{2 \, \arctan \left (c x\right )}{x^{3}}\right )} b d^{2} + \frac{a c^{2} d^{2}}{x} - \frac{i \, a c d^{2}}{x^{2}} - \frac{a d^{2}}{3 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^4,x, algorithm="maxima")

[Out]

1/2*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b*c^2*d^2 - I*((c*arctan(c*x) + 1/x)*c + arctan(c*x)/x
^2)*b*c*d^2 + 1/6*((c^2*log(c^2*x^2 + 1) - c^2*log(x^2) - 1/x^2)*c - 2*arctan(c*x)/x^3)*b*d^2 + a*c^2*d^2/x -
I*a*c*d^2/x^2 - 1/3*a*d^2/x^3

________________________________________________________________________________________

Fricas [A]  time = 2.74852, size = 316, normalized size = 3.63 \begin{align*} -\frac{8 \, b c^{3} d^{2} x^{3} \log \left (x\right ) - 7 \, b c^{3} d^{2} x^{3} \log \left (\frac{c x + i}{c}\right ) - b c^{3} d^{2} x^{3} \log \left (\frac{c x - i}{c}\right ) - 6 \,{\left (a - i \, b\right )} c^{2} d^{2} x^{2} -{\left (-6 i \, a - b\right )} c d^{2} x + 2 \, a d^{2} -{\left (3 i \, b c^{2} d^{2} x^{2} + 3 \, b c d^{2} x - i \, b d^{2}\right )} \log \left (-\frac{c x + i}{c x - i}\right )}{6 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^4,x, algorithm="fricas")

[Out]

-1/6*(8*b*c^3*d^2*x^3*log(x) - 7*b*c^3*d^2*x^3*log((c*x + I)/c) - b*c^3*d^2*x^3*log((c*x - I)/c) - 6*(a - I*b)
*c^2*d^2*x^2 - (-6*I*a - b)*c*d^2*x + 2*a*d^2 - (3*I*b*c^2*d^2*x^2 + 3*b*c*d^2*x - I*b*d^2)*log(-(c*x + I)/(c*
x - I)))/x^3

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)**2*(a+b*atan(c*x))/x**4,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.22176, size = 194, normalized size = 2.23 \begin{align*} \frac{7 \, b c^{3} d^{2} x^{3} \log \left (c x + i\right ) + b c^{3} d^{2} x^{3} \log \left (c x - i\right ) - 8 \, b c^{3} d^{2} x^{3} \log \left (x\right ) - 6 \, b c^{2} d^{2} i x^{2} + 6 \, b c^{2} d^{2} x^{2} \arctan \left (c x\right ) + 6 \, a c^{2} d^{2} x^{2} - 6 \, b c d^{2} i x \arctan \left (c x\right ) - 6 \, a c d^{2} i x - b c d^{2} x - 2 \, b d^{2} \arctan \left (c x\right ) - 2 \, a d^{2}}{6 \, x^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+I*c*d*x)^2*(a+b*arctan(c*x))/x^4,x, algorithm="giac")

[Out]

1/6*(7*b*c^3*d^2*x^3*log(c*x + i) + b*c^3*d^2*x^3*log(c*x - i) - 8*b*c^3*d^2*x^3*log(x) - 6*b*c^2*d^2*i*x^2 +
6*b*c^2*d^2*x^2*arctan(c*x) + 6*a*c^2*d^2*x^2 - 6*b*c*d^2*i*x*arctan(c*x) - 6*a*c*d^2*i*x - b*c*d^2*x - 2*b*d^
2*arctan(c*x) - 2*a*d^2)/x^3